﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Medianamik.Core.Security;

namespace Medianamik.Core
{
    public struct NodeTypeDataShell
    {
        public NodeTypeDataShell(NodeType type)
        {
            _nodeType = type;
            _properties = new List<NodeTypeProperty>();
            _deletedProperties = new List<NodeTypeProperty>();
            _hierarchicalTypeRules = new List<HierarchicalRule>();
            _deletedHierarchicalTypeRules = new List<HierarchicalRule>();
            _hierarchicalNodeRules = new List<HierarchicalRule>();
            _deletedHierarchicalNodeRules = new List<HierarchicalRule>();
            _templates = new List<TypeTemplate>();
            _deletedTemplates = new List<TypeTemplate>();
            _interfaces = new List<NodeTypeInterfaceImplementation>();
            _deletedInterfaces = new List<NodeTypeInterfaceImplementation>();
        }

        public NodeTypeDataShell(NodeType type,
                IEnumerable<NodeTypeProperty> properties,
                IEnumerable<NodeTypeProperty> deletedProperties,
                IEnumerable<HierarchicalRule> hierarchicalTypeRules,
                IEnumerable<HierarchicalRule> deletedHierarchicalTypeRules,
                IEnumerable<HierarchicalRule> hierarchicalNodeRules,
                IEnumerable<HierarchicalRule> deletedHierarchicalNodeRules,
                IEnumerable<TypeTemplate> templates,
                IEnumerable<TypeTemplate> deletedTemplates,
            IEnumerable<NodeTypeInterfaceImplementation> interfaces,
            IEnumerable<NodeTypeInterfaceImplementation> deletedInterfaces)
        {
            _nodeType = type;
            _properties = properties;
            _deletedProperties = deletedProperties;
            _hierarchicalTypeRules = hierarchicalTypeRules;
            _deletedHierarchicalTypeRules = deletedHierarchicalTypeRules;
            _hierarchicalNodeRules = hierarchicalNodeRules;
            _deletedHierarchicalNodeRules = deletedHierarchicalNodeRules;
            _templates = templates;
            _deletedTemplates = deletedTemplates;
            _interfaces = interfaces;
            _deletedInterfaces = deletedInterfaces;
        }

        public NodeType NodeType { get { return _nodeType; } }
        NodeType _nodeType;

        public IEnumerable<NodeTypeProperty> Properties { get { return _properties; } }
        IEnumerable<NodeTypeProperty> _properties;

        public IEnumerable<NodeTypeProperty> DeletedProperties { get { return _deletedProperties; } }
        IEnumerable<NodeTypeProperty> _deletedProperties;

        public IEnumerable<HierarchicalRule> HierarchicalTypeRules { get { return _hierarchicalTypeRules; } }
        IEnumerable<HierarchicalRule> _hierarchicalTypeRules;

        public IEnumerable<HierarchicalRule> DeletedHierarchicalTypeRules { get { return _deletedHierarchicalTypeRules; } }
        IEnumerable<HierarchicalRule> _deletedHierarchicalTypeRules;

        public IEnumerable<HierarchicalRule> HierarchicalNodeRules { get { return _hierarchicalNodeRules; } }
        IEnumerable<HierarchicalRule> _hierarchicalNodeRules;

        public IEnumerable<HierarchicalRule> DeletedHierarchicalNodeRules { get { return _deletedHierarchicalNodeRules; } }
        IEnumerable<HierarchicalRule> _deletedHierarchicalNodeRules;

        public IEnumerable<TypeTemplate> Templates { get { return _templates; } }
        IEnumerable<TypeTemplate> _templates;

        public IEnumerable<TypeTemplate> DeletedTemplates { get { return _deletedTemplates; } }
        IEnumerable<TypeTemplate> _deletedTemplates;

        public IEnumerable<NodeTypeInterfaceImplementation> Interfaces { get { return _interfaces; } }
        IEnumerable<NodeTypeInterfaceImplementation> _interfaces;

        public IEnumerable<NodeTypeInterfaceImplementation> DeletedInterfaces { get { return _deletedInterfaces; } }
        IEnumerable<NodeTypeInterfaceImplementation> _deletedInterfaces;
    }
}
